<template>
	<view>
		<view class="flash">
			<swiper class="flash">
				<swiper-item class="flash-item">
					<view class="flash-item">
						<image src="/static/flash-001.jpeg"></image>
					</view>
				</swiper-item>
			</swiper>
		</view>
		<view class="food-order">
			<view class="layout">
				<view class="food-order-shopping" @click="onOrderScanCodeButton()">
					<view class="food-order-shopping-icon">
						<image src="../../static/food.jpg"></image>
					</view>
					<view class="food-order-shopping-text">点单</view>
				</view>
				<view class="food-order-checkout">
					<view class="food-order-checkout-item">
						<view class="food-order-checkout-item-icon">
							<image src="../../static/logo.png"></image>
						</view>
						<view class="food-order-checkout-item-text">自取</view>
					</view>
					<view class="food-order-checkout-item">
						<view class="food-order-checkout-item-icon">
							<image src="../../static/logo.png"></image>
						</view>
						<view class="food-order-checkout-item-text">外卖</view>
					</view>
				</view>
			</view>
		</view>
		<view class="food-coupon" @click="onCouponMainButton()">
			<view class="layout">
				<view class="food-coupon-icon">
					<image src="../../static/logo.png"></image>
				</view>
				<view class="food-coupon-subject">优惠卷</view>
				<view class="food-coupon-tooltip">领卷下单更优惠</view>
				
			</view>
		</view>
		<view class="food-well">
			<view class="layout">					
				<view class="food-well-item" @click="onHomeButton()">
					<view class="food-well-item-icon">
						<image src="../../static/logo.png"></image>
					</view>
					<view class="food-well-item-text">会员中心</view>
				</view>
				<view class="food-well-item">
					<view class="food-well-item-icon">
						<image src="../../static/logo.png"></image>
					</view>
					<view class="food-well-item-text">充值中心</view>
				</view>
			</view>
		</view>
		<view class="food-interal">
			<view class="layout">
				<view class="food-interal-text">积分商城</view>
				<view class="food-interal-icon">
					<image src="../../static/logo.png"></image>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
			}
		},
		onLoad() {

		},
		methods: {
			onCouponMainButton:function(){
				uni.redirectTo({
					url:"/pages/coupon/main/main"
				})
			},
			onHomeButton:function(){
				uni.switchTab({
					url:"/pages/home/main/main"
				})
			},
			onOrderScanCodeButton:function(){
				uni.scanCode({
					success(res) {
						console.log("扫码")
					}
				})
			}

		}
	}
</script>

<style>
.flash { height: 400rpx; margin-bottom: 30rpx; }
.flash-item { height: 400rpx; }

.food-order { width: 700rpx; margin: 0 auto; }
.food-order-shopping { background: #fff; width: 260rpx; height: 240rpx; padding: 30rpx 20rpx; border-radius: 20rpx; }
.food-order-shopping-text { text-align: center; font-size: 18px; }
.food-order-shopping-icon { width: 100rpx; height: 100rpx; margin: 0 auto; margin-top: 40rpx;}

.food-order-checkout-item { width: 320rpx; height: 80rpx; margin-bottom: 20rpx; border-radius: 20rpx; background: #fff; }
.food-order-checkout-item { padding: 30rpx 20rpx;}
.food-order-checkout-item-icon  { width: 80rpx; margin: 0 auto; height: 40rpx;}
.food-order-checkout-item-text { text-align: center; font-size: 18px;}

.food-coupon { width: 660rpx; height: 50rpx; padding: 20rpx; margin: 30rpx auto; background: #fff; border-radius: 20rpx; }
.food-coupon-icon { width: 50rpx; height: 50rpx; padding-right: 30rpx; }
.food-coupon-subject { width: 200rpx; height: 50rpx; text-align: left; font-size: 16px; font-weight: 600;}
.food-coupon-tooltip { width: 380rpx; height: 50rpx; line-height: 50rpx; text-align: right; }

.food-well { width: 700rpx; margin: 0 auto; }
.food-well-item { width: 340rpx; background: #fff; height: 300rpx; border-radius: 20rpx;}
.food-well-item-icon { width: 100rpx; height: 80rpx; margin: 0 auto; margin-top: 100rpx;}
.food-well-item-text { text-align: center; padding-top: 30rpx; font-size: 18px; }

.food-interal { width: 660rpx; margin: 0 auto; border-radius: 20rpx; margin-top: 30rpx; padding: 20rpx; background: #fff; }
.food-interal-icon { width: 100rpx; height: 80rpx;}
.food-interal-text { width: 560rpx; height: 100rpx; font-size: 18px;}
</style>
